﻿namespace OMR.Crawler.Core.Crawlers
{
    public abstract class CrawlerFactory
    {
        //TODO: plugin based crawler creation
        public static CrawlerBase Create(MyCollection settings)
        {
            var entryPoint = (string)settings.GetItem("EntryPoint").Value;

            // TODO: add global settings 
            if (entryPoint.StartsWith("http"))
            {
                return new WebCrawler(settings);
            }
            else
            {
                return new FSCrawler(settings);
            }
        }
    }
}
